<?php


namespace App\factorys;


use app\servers\DxbSmsServer;
use app\servers\RlySmsServer;

class Sms
{
    const DUANXINBAO = 'duanxinbao';
    const RONGLIANYUN = 'ronglianyun';

    public static function send($type,$phone)
    {
        switch ($type){
            case self::DUANXINBAO : $note = new DxbSmsServer(); break;
            case self::RONGLIANYUN : $note =new RlySmsServer(); break;
            default : return null;
        }
        return $note->sendSms($phone,true);
    }
}
